Skip to content

Exclude the duplicate media types in AbstractMessageConverterMethodProcessor::determineCompatibleMediaTypes #34785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

lgxbslgx
Copy link
Contributor

Hi all,

This trivial patch excludes the duplicate media types in the method AbstractMessageConverterMethodProcessor::determineCompatibleMediaTypes.

Thanks for your review.

Best Regards,
-- Guoxiong

…ocessor::determineCompatibleMediaTypes

Signed-off-by: Guoxiong Li <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 20, 2025
@rstoyanchev
Copy link
Contributor

I'm not sure it's that simple as the selected media type may have a quality parameter, and removing some even if duplicate may change the result.

Is there a specific issue that this is causing?

@rstoyanchev rstoyanchev added status: waiting-for-feedback We need additional information before we can continue in: web Issues in web modules (web, webmvc, webflux, websocket) labels Apr 30, 2025
@lgxbslgx
Copy link
Contributor Author

lgxbslgx commented May 6, 2025

Is there a specific issue that this is causing?

I debuged the code and found the duplicate items. It doesn't cause a bug locally.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 6, 2025
@rstoyanchev
Copy link
Contributor

Thanks for clarifying.

Eliminating duplicates could have a side effect since media types can have parameters. At the same duplicates do not affect the outcome since we expect a single media type to be chosen, so I'm going to decline this.

@rstoyanchev rstoyanchev closed this May 7, 2025
@rstoyanchev rstoyanchev added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: feedback-provided Feedback has been provided labels May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants